/*
 * @Author: long
 * @Date: 2021-09-01 14:35:48
 * @LastEditTime: 2021-10-19 16:30:37
 * @LastEditors: Please set LastEditors
 * @Description: 应用管理
 * @FilePath: \ant-design-vue-jeecge:\hjimi\人脸辨识云\html\gitlab\pc\faceCloudWebsite\src\api\application-manage\application.js
 */
import request from '@/utils/request'

const APP = 'api/v1/charge/api/application/'

/**
 * @description 创建应用
 * @param {object}
 */
export function addApp(params) { return request({ url: `${ APP }create`, method: 'POST', data: params, headers: {"Content-Type": "application/json"} })}

/**
 * @description 编辑应用
 * @param {object}
 */
 export function editApp(params) { return request({ url: `${ APP }/update`, method: 'POST', data: params })}

/**
 * @description 删除应用
 * @param {object}
 */
 export function delApp(params) { return request({ url: `${ APP }/delete`, method: 'POST', data: params })}

 /**
 * @description 应用列表
 */
  export function appList() { return request({ url: `${ APP }list`, method: 'GET' })}

/**
 * @description 应用详情
 */
    export function appDetails(id) { return request({ url: `${ APP }detail?id=${ id }`, method: 'GET' })}

/**
 * @description 应用列表-导航
 */
 export function appNav() { return request({ url: `${ APP }nav`, method: 'GET' })}

 /**
 * @description 应用开通的接口列表
 */
 export function appOpenList(id) { return request({ url: `${ APP }resources?id=${ id }`, method: 'GET' })}